home *** CD-ROM | disk | FTP | other *** search
- on setPlace place, change
- global gPlace
- repeat with i = 1 to 47
- if the puppet of sprite i = 1 then
- alert("setPlace: Puppetsprite not reset!" && x)
- halt()
- end if
- end repeat
- if change = #change then
- set gPlace to place
- end if
- if place = #LOGIN then
- setPuppets("8,12,13,20", 1)
- else
- if place = #title then
- setPuppets("3,8,9,10,11,12,17", 1)
- else
- if place = #menu then
- setPuppets("19,22", 1)
- else
- if place = #play then
- setPuppets("1,6,7,13,15,16,17,18,19,20,21,22,24,25,26,46,47", 1)
- else
- if place = #CREDITS then
- setPuppets("9,10,17", 1)
- else
- if place = #CONTROLS then
- setPuppets("7,10,11,12,13,14,18,19,21,22,24,47", 1)
- else
- if place = #ENDSCREEN then
- setPuppets("1,10,11,12,13,14,15,16,17,18,19,20,23,47", 1)
- else
- alert("Illegal value for gPlace: " & place)
- halt()
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- stopMouseTrap()
- end
-
- on setPuppets str, check
- set n to the number of items in str
- repeat with i = 1 to n
- if the castNum of sprite value(item i of str) = 0 then
- if check = 1 then
- alert("setPuppets: no sprite exists when setting puppet. " & value(item i of str))
- halt()
- else
- end if
- end if
- puppetSprite(value(item i of str), 1)
- end repeat
- end
-
- on resetPuppets
- repeat with i = 1 to 47
- puppetSprite(i, 0)
- end repeat
- end
-
- on highlight x
- set the castNum of sprite x to the castNum of sprite x + 1
- end
-
- on unhighlight x
- set the castNum of sprite x to the castNum of sprite x - 1
- end
-
- on setPageArrows enab
- if enab then
- set the castNum of sprite 1 to cast "Panel w/arrows"
- else
- set the castNum of sprite 1 to cast "Panel w/o arrows"
- end if
- end
-
- on blankResponsePicts
- repeat with i = 0 to 3
- set the castNum of sprite (2 + i) to 341
- end repeat
- end
-
- on setResponsePicts index
- repeat with i = 0 to 3
- set the castNum of sprite (2 + i) to index + i
- updateStage()
- end repeat
- end
-
- on setResponsePict which, base
- set the castNum of sprite (2 + which) to base + i
- end
-
- on setGoalPost pr
- set the locV of sprite 5 to 308 - (pr * 9 / 5)
- end
-
- on setBorderHighlight c
- set the castNum of sprite 6 to cast c
- end
-
- on setPos6 sP
- set the locH of sprite 6 to the locH of sprite sP
- set the locV of sprite 6 to the locV of sprite sP
- end
-
- on hide6
- set the locH of sprite 6 to 1000
- end
-
- on setShowTextGray
- set the castNum of sprite 7 to cast "gray mode 4 picts"
- set the locH of sprite 7 to the locH of sprite 12
- set the locV of sprite 7 to the locV of sprite 12
- end
-
- on hideShowTextGray
- set the locH of sprite 7 to 1000
- end
-
- on hide7
- set the locH of sprite 8 to 1000
- end
-
- on setChalPict c
- set the castNum of sprite 8 to c
- end
-
- on showCTextPuppet x
- set the locH of sprite 8 to x
- end
-
- on setChallengeText
- set the locH of sprite 10 to the left of sprite 8 + 5
- end
-
- on hide9
- set the locH of sprite 10 to 1000
- end
-
- on setTextPuppetPos which
- if (which = 1) or (which = 3) then
- set the locH of sprite (7 + which) to 5
- else
- set the locH of sprite (7 + which) to 225
- end if
- end
-
- on showTextPuppet i
- set the locH of sprite (7 + i) to the left of sprite (1 + i) + 15
- end
-
- on showTextPuppets
- repeat with i = 1 to 4
- showTextPuppet(i)
- end repeat
- end
-
- on hideTextPuppet which
- set the locH of sprite (7 + which) to 1000
- end
-
- on hideTextPuppets
- repeat with i = 1 to 4
- hideTextPuppet(i)
- end repeat
- end
-
- on setVolButton x
- set the locV of sprite 10 to 300 - (x * 14)
- end
-
- on setChallengePict x
- set the castNum of sprite 12 to x
- end
-
- on highlightChalSpeaker
- highlight(13)
- end
-
- on unhighlightChalSpeaker
- unhighlight(13)
- end
-
- on setBlindfoldIcon blind
- if blind then
- set the castNum of sprite 13 to 210
- else
- set the castNum of sprite 13 to 205
- end if
- end
-
- on setChalSpeaker SNDCHAL
- if SNDCHAL = #UPLEFT then
- set the locH of sprite 13 to 3
- set the locV of sprite 13 to 46
- else
- if SNDCHAL = #ONPCT then
- set h to the locH of sprite 12 - (the width of sprite 12 / 2) + 1
- set v to the locV of sprite 12 + (the height of sprite 12 / 2) - 2
- set the locH of sprite 13 to h
- set the locV of sprite 13 to v
- else
- if SNDCHAL = #NONE then
- set the locH of sprite 13 to 1000
- else
- alert("Illegal value for setChalSpeaker: " & SNDCHAL)
- halt()
- end if
- end if
- end if
- end
-
- on setSavePuppets
- set the castNum of sprite 12 to 164
- set the castNum of sprite 14 to 166
- end
-
- on flashCenterSpeaker
- set the castNum of sprite 14 to cast "Center Speaker Highlight"
- end
-
- on normalCenterSpeaker
- set the castNum of sprite 14 to cast "Center Speaker"
- end
-
- on highlightCenterSpeaker
- set the castNum of sprite 14 to cast "Center Speaker Cycle"
- end
-
- on setPuppetScore c
- if c = #blank then
- set the castNum of sprite 15 to cast "Score Blank"
- else
- if c = #smiley then
- set the castNum of sprite 15 to cast "Score Smiley"
- else
- if c = #check then
- set the castNum of sprite 15 to cast "Score Check"
- end if
- end if
- end if
- end
-
- on setTogglePuppet c
- set the castNum of sprite 18 to cast c
- end
-
- on highlightYeahSnd which
- set h to 160 + ((which - 1) mod 4 * 39)
- set v to 170 + ((which - 1) / 4 * 36)
- set the locH of sprite 18 to h
- set the locV of sprite 18 to v
- end
-
- on highlightNoSnd which
- set h to 160 + ((which - 1) mod 4 * 39)
- set v to 250 + ((which - 1) / 4 * 36)
- set the locH of sprite 19 to h
- set the locV of sprite 19 to v
- end
-
- on showScorePuppet show
- if show then
- set the locH of sprite 19 to 438
- set the locH of sprite 20 to 479
- else
- set the locH of sprite 19 to 1000
- set the locH of sprite 20 to 1000
- end if
- end
-
- on drawModePuppet isChallenge
- if isChallenge then
- set the castNum of sprite 21 to cast "ModeType"
- set the locH of sprite 21 to 492
- set the locV of sprite 21 to 79
- else
- set the castNum of sprite 21 to cast "BrowseType"
- set the locH of sprite 21 to 432
- set the locV of sprite 21 to 77
- end if
- end
-
- on setFlagsPuppet c
- set the castNum of sprite 22 to c
- end
-
- on showMike
- set the castNum of sprite 25 to cast "mike"
- set the locH of sprite 25 to 473
- end
-
- on showShowText
- set the castNum of sprite 26 to cast "Browse A Text off"
- set the locH of sprite 26 to 473
- end
-
- on setMercury x
- spriteBox(29, 347, 308, 357, 308 - (x * 9 / 5))
- end
-
- on showDict which
- set the locH of sprite 30 to 215
- set the locH of sprite 31 to 352
- set the locH of sprite 32 to 45
- set the locH of sprite 33 to 352
- set the castNum of sprite 30 to cast "dict text box"
- set the castNum of sprite 31 to 201
- set the castNum of sprite 32 to cast "dict text"
- set the castNum of sprite 33 to cast "dict check"
- if which > 2 then
- set the locV of sprite 30 to 121
- set the locV of sprite 31 to 140
- set the locV of sprite 32 to 73
- set the locV of sprite 33 to 104
- else
- set the locV of sprite 30 to 318
- set the locV of sprite 31 to 337
- set the locV of sprite 32 to 271
- set the locV of sprite 33 to 301
- end if
- set the text of cast "dict text" to EMPTY
- set the keyDownScript to "handleDictKey"
- end
-
- on hideDict
- set the locH of sprite 30 to 1000
- set the locH of sprite 31 to 1000
- set the locH of sprite 32 to 1000
- set the locH of sprite 33 to 1000
- set the editableText of sprite 32 to 0
- set the castNum of sprite 32 to 29
- set the keyDownScript to "handlekey"
- end
-
- on showjumpcontrol
- set the ink of sprite 46 to 0
- set the locH of sprite 46 to 260
- set the locV of sprite 46 to 190
- set the castNum of sprite 46 to cast "Jump Control"
- end
-
- on hideJumpControl
- set the locH of sprite 46 to 1000
- end
-
- on hideOverlay
- set the locH of sprite 47 to 1000
- end
-
- on highlightSpeaker x
- set h to the locH of sprite 14
- set v to the locV of sprite 14
- set the castNum of sprite 47 to value(item x of "218,222,220,224")
- set the locH of sprite 47 to h + item x of "-40,2,-40,2"
- set the locV of sprite 47 to v + item x of "-37,-37,2,2"
- end
-
- on highlightDictSpeaker x
- set the castNum of sprite 47 to value(item x of "208,209,208,209")
- set the locH of sprite 47 to value(item x of "177,219,177,219")
- set the locV of sprite 47 to value(item x of "183,183,222,222")
- end
-
- on setOverlayPuppet h, v, c
- set the locH of sprite 47 to h
- set the locV of sprite 47 to v
- set the castNum of sprite 47 to c
- end
-
- on alignYesNo which, icon
- global gStuMethod
- if which = 0 then
- set the locH of sprite 47 to the locH of sprite 30
- set the locV of sprite 47 to the locV of sprite 30
- else
- if which = -1 then
- set the locH of sprite 47 to 400
- set the locV of sprite 47 to 260
- else
- set the locH of sprite 47 to the locH of sprite (which + 1)
- set the locV of sprite 47 to the locV of sprite (which + 1)
- end if
- end if
- if getaProp(gStuMethod, #icons) = #smiley then
- set i to "smileyface"
- else
- set i to "checkmark"
- end if
- if icon = #YES then
- set the castNum of sprite 47 to cast i
- else
- if icon = #no then
- set the castNum of sprite 47 to cast (the number of cast i + 1)
- else
- set the castNum of sprite 47 to cast "timeout icon"
- end if
- end if
- end
-
- on initMouseTrap
- setPuppets("48")
- set the lineSize of sprite 48 to 0
- end
-
- on setMouseTrap
- set the visible of sprite 48 to 1
- end
-
- on stopMouseTrap
- set the visible of sprite 48 to 0
- end
-
- on checkPuppet proc, x
- if the puppet of sprite x = 0 then
- alert(proc & ": Not puppetsprite!" && x)
- halt()
- end if
- end
-
- on dumpSprite x
- set st to " - "
- put the backColor of sprite x after st
- put ";" after st
- put the blend of sprite x after st
- put ";" after st
- put the bottom of sprite x after st
- put ";" after st
- put the castNum of sprite x after st
- put ";" after st
- put the constraint of sprite x after st
- put ";" after st
- put the cursor of sprite x after st
- put ";" after st
- put the editableText of sprite x after st
- put ";" after st
- put the foreColor of sprite x after st
- put ";" after st
- put the height of sprite x after st
- put ";" after st
- put the ink of sprite x after st
- put ";" after st
- put the left of sprite x after st
- put ";" after st
- put the lineSize of sprite x after st
- put ";loch=" after st
- put the locH of sprite x after st
- put ";" after st
- put the locV of sprite x after st
- put ";" after st
- put the moveableSprite of sprite x after st
- put ";" after st
- put the puppet of sprite x after st
- put ";" after st
- put the right of sprite x after st
- put ";" after st
- put the scoreColor of sprite x after st
- put ";" after st
- put the scriptNum of sprite x after st
- put ";" after st
- put the stretch of sprite x after st
- put ";" after st
- put the top of sprite x after st
- put ";" after st
- put the trails of sprite x after st
- put ";" after st
- put the type of sprite x after st
- put ";" after st
- put the visible of sprite x after st
- put ";" after st
- put the width of sprite x after st
- put ";" after st
- put "Sprite: " & x && st
- end
-